Auto-adjusting high accuracy oscillator

ABSTRACT

An auto-adjusting high accuracy oscillator is disclosed, which includes: a frequency comparator, for comparing a synchronization signal obtained from a USB host with an oscillation signal obtain from a device; a control tuning circuit, further comprising a counter and an adder/sub circuit; and an oscillating element; wherein a variation is obtained by the counting of the counter while transmitting the variation to the adder/sub circuit to be encoded thereby into a digital code so as to enable the oscillating element to perform a frequency up/down operation accordingly for approaching the synchronization signal successively.

FIELD OF THE INVENTION

The present invention relates to an auto-adjusting high accuracyoscillator, and more particularly, to an auto-adjusting oscillator foran universal-serial-bus (USB) interface that is capable of matching aninternal clock to a data stream inputted from the USB interface byapproaching the difference between two to be within 1% error rate,whereas the auto-adjusting oscillator is an internal non-quartzoscillator so that it is a compact and cost-saving device withauto-adjusting mechanism capable of being adapted for any specificationsof USB protocol.

BACKGROUND OF THE INVENTION

It is known that the use of an auto-adjusting oscillator is tosynchronize an internal clock to the data rate of an USB interface forensuring data to be transmitted accurately and stably. Conventionalapproaches for matching an internal clock to an incoming data stream,such as Phase Lock Loops (PLL) and/Delay Lock Loops (DLL), are notappropriate to be used for locking a data stream inputted from an USBinterface by the following reasons:

-   -   (1) Such conventional approaches, e.g. PLL and DLL, typically        require a continuous stream of input reference clocks to match        the data rate of incoming data, however, such continuous stream        is not available in data communication systems using USB        interface.    -   (2) Such conventional approaches, e.g. PLL and DLL, typically        require a very long data training sequence, however, such a long        data training sequence will require a long locking time that is        not suitable for USB.    -   (3) Such conventional approaches, e.g. PLL and DLL, typically        require a precision timing component for preventing timing        error, however, such precision timing component is usually not        available in USB applications.

From the above description, it is clear that those conventionalapproaches, such as PLL and DLL, are not suitable to be applied in USBapplications.

SUMMARY OF THE INVENTION

In view of the disadvantages of prior art, the primary object of thepresent invention is to provide an auto-adjusting high accuracyoscillator for an universal-serial-bus (USB) interface that is capableof matching an internal clock to a data stream inputted from the USBinterface by approaching the difference between two to be within 1%error rate, whereas the auto-adjusting oscillator is an internalnon-crystal oscillator so that it is a compact and cost-saving devicewith auto-adjusting mechanism capable of being adapted for anyspecifications of USB protocol, such as USB 1.1 and USB 2.0, etc.

It is another object of the invention to provide an auto-adjusting highaccuracy oscillator with internal feedback circuit for detecting andcalibrating oscillating frequency, in which a detection circuit is usedfor automatically detecting the frequency difference between an USBsignal and an oscillating frequency generated from an oscillator whilecalibrating and approaching the oscillating frequency to be within 1%error rate of the USB signal by a means of successive-approximation.

To achieve the above objects, the present invention provides anauto-adjusting high accuracy oscillator, comprising:

-   -   a frequency comparator, for comparing a synchronization signal        obtained from a USB host with an oscillation signal obtain from        a device so as to obtain a frequency difference between the two;    -   a control tuning circuit, further comprising a counter and an        adder/sub circuit, for receiving the frequency difference        received form the frequency comparator and using the same as an        adjusting reference; and    -   an oscillating element;    -   wherein, a variation is obtained by the counting of the counter        while transmitting the variation and the adjusting reference to        the adder/sub circuit to be encoded thereby into a digital code        so as to enable the oscillating element to perform a frequency        up/down operation according to the digital code, and thus enable        the frequency of the oscillation signal to approach that of the        synchronization signal successively.

Further, to achieve the above objects, the present invention provides anauto-adjusting high accuracy oscillator, comprising:

-   -   a frequency comparator, for comparing a synchronization signal        obtained from a USB host with an oscillation signal obtain from        a device so as to obtain a frequency difference between the two;    -   a control tuning circuit, further comprising a charge pump and        an analog/digital (A/D) converter, capable of generating a        digital code encoded in response to the frequency difference;        and    -   an oscillating element;    -   wherein, the oscillating element is enabled to perform a        frequency up/down operation with respect to the digital code so        as to enable the frequency of the oscillation signal to approach        that of the synchronization signal successively.

Yet, to achieve the above objects, the present invention furtherprovides an auto-adjusting high accuracy oscillator, comprising:

-   -   a frequency comparator, for comparing a synchronization signal        obtained from a USB host with an oscillation signal obtain from        a device so as to obtain a frequency difference between the two;    -   a control tuning circuit, further comprising a time-to-digital        circuit, capable of generating a digital code encoded in        response to the frequency difference; and    -   an oscillating element;    -   wherein, the oscillating element is enabled to perform a        frequency up/down operation with respect to the digital code so        as to enable the frequency of the oscillation signal to approach        that of the synchronization signal successively.

Other aspects and advantages of the present invention will becomeapparent from the following detailed description, taken in conjunctionwith the accompanying drawings, illustrating by way of example theprinciples of the present invention.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram illustrating the functional blocks of anauto-adjusting high accuracy oscillator according to a first embodimentof the present invention.

FIG. 2 is a schematic diagram depicting an adjustment applying theauto-adjusting high accuracy oscillator of the present invention.

FIG. 3 is a schematic diagram illustrating the functional blocks of anauto-adjusting high accuracy oscillator according to a second embodimentof the present invention.

FIG. 4 is a schematic diagram illustrating the functional blocks of anauto-adjusting high accuracy oscillator according to a third embodimentof the present invention.

FIG. 5 is a profile depicting the relation between error and SYN numberaccording to the present invention.

FIG. 6 is a schematic diagram illustrating the functional blocks of anauto-adjusting high accuracy oscillator according to a fourth embodimentof the present invention.

FIG. 7A is a schematic diagram illustrating the functional blocks of anauto-adjusting high accuracy oscillator according to a fifth embodimentof the present invention.

FIG. 7B is a schematic diagram illustrating the functional blocks of anauto-adjusting high accuracy oscillator according to a sixth embodimentof the present invention.

FIG. 7C is a schematic diagram illustrating the functional blocks of anauto-adjusting high accuracy oscillator according to a seventhembodiment of the present invention.

DESCRIPTION OF THE PREFERRED EMBODIMENT

For your esteemed members of reviewing committee to further understandand recognize the fulfilled functions and structural characteristics ofthe invention, several preferable embodiments cooperating with detaileddescription are presented as the follows.

It is preferred to activate an auto-adjusting circuit for adjusting anoscillating element to match an internal clock to a data stream inputtedfrom an USB interface as soon as a complete 1 bit rate of asynchronization signal is obtained while the synchronization signal isbeing inputted from the USB interface, so that the data transmission canbe synchronized and thus the accuracy of data to be received can beenhanced. The synchronization signal is referred as SYNC signalhereinafter.

Please refer to FIG. 1 and FIG. 2, which are respectively a schematicdiagram illustrating the functional blocks of an auto-adjusting highaccuracy oscillator according to a first embodiment of the presentinvention and a schematic diagram depicting an adjustment applying theauto-adjusting high accuracy oscillator. As seen in FIG. 1 and FIG. 2,as soon as the frequency comparator 12 receives a SYNC signal 11, itwill compare the bit rates of the inputted SYNC signal 11 and anoscillation signal being fed back from the oscillating element 14 so asto obtain an frequency error of the oscillating element 14, and then theresulting frequency error is fed to the control tuning circuit 13 forenabling the same to generate an adjusting signal in response theretoautomatically, and then the adjusting signal is sent to the oscillatingelement 14 for adjusting oscillation signal of the oscillating element14 accordingly, and thereafter, the adjusted oscillation signal is fedback to the frequency comparator 12 so as to form a feedback loop untilthe oscillation signal of the oscillating element 14 can match the SYNCsignal 11 to the extend that the error is below is 1%.

The auto-adjusting oscillator of FIG. 1 comprises a frequency comparator12, a control tuning circuit 13 and an oscillating element 14, which isused to match an internal clock to a data stream inputted from the USBinterface by approaching the difference between two to be within 1%error rate.

Please refer to FIG. 3, which is a schematic diagram illustrating thefunctional blocks of an auto-adjusting high accuracy oscillatoraccording to a second embodiment of the present invention. Theauto-adjusting high accuracy oscillator of FIG. 3 comprises: a frequencycomparator 22, further comprising a pulse detector 221 for detecting andcomparing a SYNC signal 21 obtained from a USB host with an oscillationsignal obtain from a device so as to obtain a frequency differencebetween the two; a control tuning circuit 23, further comprising acounter 231 and an adder/sub circuit 232, for receiving the frequencydifference received form the frequency comparator and using the same asan adjusting reference; and an oscillating element 24; a variation isobtained by the counting of the counter while transmitting the variationand the adjusting reference to the adder/sub circuit 232 to be encodedthereby into a digital code so as to enable the oscillating element 24to perform a frequency up/down operation according to the digital code,and thus enable the frequency of the oscillation signal to approach thatof the SYNC signal 21 successively. Moreover, the frequency-adjustingmethod of the oscillating element 24 is defined by the control tuningcircuit 23 that the half of the frequency difference between the SYNCsignal and the oscillating signal is employed as the amount of frequencyto be adjusted in each feedback, e.g. the first adjustment is(1/2)×(frequency difference), and the second adjustment is(1/2)×(1/2)×(frequency difference), and so on. The aforesaidfrequency-adjusting method is referred as successive-approximationmethod, which is capable of approaching the difference between two to bewithin 1% error rate, and being adapted for any specifications of USBprotocol.

Please refer to FIG. 4, which is a schematic diagram illustrating thefunctional blocks of an auto-adjusting high accuracy oscillatoraccording to a third embodiment of the present invention. In FIG. 4, theauto-adjusting oscillator is activated as soon as a packet of a SYNCsignal 31 inputted from the data input end is received thereby, in whicha pulse detector 32 is used to compare the SYNC signal 31 and a feedbackoscillation signal generated by an oscillating element 37 so as toidentify a time error (ΔT) of time domain between the two, and then thetime error (ΔT) is being converted into a voltage error (ΔV) by a chargepump 33, and then the voltage error (ΔV) is compared with a referencevoltage generated by a bandgap reference circuit at an analog-digitalconverter 34 for enabling the same to generate an M signal according tobe used by the control tuning circuit 36 as an adjusting reference.

As soon as the generating of the M signal, a control unit 35 is enabledto inform the control tuning circuit 36. As the control tuning circuit36 is informed of the M signal, a latch circuit 361 is enabled toperform a code locking operation for defining an A-code in response tothe M signal and a counter 363 will also start counting for defining aB-code basing on the counting, and then the A-code and the B-code aretransmitted to the adder/sub circuit 362 for enabling the same togenerate an S-code being used to control the oscillating element 37.Preferably, the S-code must satisfy the frequency resolution of theoscillating element 37 and the oscillation frequency range of theoscillating element 37.

Moreover, the initial change of oscillation frequency should fulfill thespecification of USB protocol with the tolerance of 5%, otherwise, thedata transmission can be interrupted or mistaken. The oscillationfrequency of the oscillating element 37 is adjust in response to theS-code corresponding to the control tuning circuit 36, that is, theoscillating element 37 will change its oscillation frequency each timewhen it receive an S-code so as to enable the changed oscillationfrequency to approach the SYNC signal successively until the error rateis lower than 1%. It is noted that initial time of frequency change isthe time that a packet of SYNC signal is received by the auto-adjustingoscillator of FIG. 4.

Furthermore, the interactive operations between each functional blocksof FIG. 4 is controlled by the control unit 35 for controlling theadjustment of pulses of the control tuning circuit 36, the timing ofcapturing the M signal, the timing to activate an auto-adjustingoperation, the frequency dividing operation of a divider 38, thecharging/discharging of the charge pump 33, and the recovery time, so asto ensure data to be transmitted accurately and then to be sent to themicro control unit 39.

Please refer to FIG. 5, which is a profile depicting the relationbetween error and SYN number according to the present invention. The Xaxis is used for representing the number of the SYNC signal received andthe Y axis is used to represent the error rate (%) compared between anadjusted oscillation frequency and the SYNC signal. As each receiving ofa packet of SYNC signal, 4 bits of the packet (1 bit rate=1.5 MHz=666.67ns) is fetched while each tuning is based on a basic unit of 2 bits,i.e. the SYNC number is increased by every 2 bits. As seen in FIG. 6,there are six data lines respectively representing initial error rate of3%, 4%, 5%, 6%, 7%, and 8% that each is going to be reduced to under 1%after being tuned by 6 times, i.e. after the SYNC number is increased tobe six.

As a packet of SYNC signal is received by an auto-adjusting oscillatorthrough the data input end, it can fetch four complete 1.5 MHz bit rateto be used for activating the control tuning circuit to adjust theoscillation frequency rapidly and accordingly. Sine only the SYNC signaltransmitted from the data input end is required as reference that it donot require the whole data stream to be transmitted form the data inputend, and also it do not require high pulse frequency for counting, theauto-adjusting oscillator will consume comparably less power and causeless error and thus there will be no frequency drift after beingsynchronized by the same. Because of an adjustment is performed as soonas a packet of SYNC signal is received, the auto-adjusting oscillator isstable and is suitable to be applied in application of USB 1.1 or USB2.0 specifications, and so on.

Please refer to FIG. 6, is a schematic diagram illustrating thefunctional blocks of an auto-adjusting high accuracy oscillatoraccording to a fourth embodiment of the present invention. Theauto-adjusting high accuracy oscillator of FIG. 6 comprises a data inputend 51, a pulse detector 52, a fast/slow detector 53, asuccessive-approximation circuit 54, a control unit 55, an oscillatingelement 56 and an output pulse end 57. However, the configuration of theauto-adjusting high accuracy oscillator of the present invention is notlimited by the foregoing structure shown in FIG. 6. There are otherconfigurations as illustrated in FIG. 7A to FIG. 7C, just to mention afew.

Please refer to FIG. 7A, which is a schematic diagram illustrating thefunctional blocks of an auto-adjusting high accuracy oscillatoraccording to a fifth embodiment of the present invention. Theauto-adjusting high accuracy oscillator of FIG. 7A comprises a pulsedetector 61, a charge pump 62, a multi-bits analog/digital converter 63and a digitally controlled oscillator 64. The digitally controlledoscillator 64 is equipped with temperature compensating ability so thatthe output current and voltage thereof are free from the influence oftemperature change and thus each can be a stable value, that is, theoscillation frequency of the digitally controlled oscillator 64 is notsubject to the influence of temperature change. The auto-adjusting highaccuracy oscillator of FIG. 7A employs a method of direct convert, thatis, the time error (ΔT) of the pulse detector 61 is converted into acorresponding voltage error (ΔV) and is further coded into a digitalcode by the analog/digital converter 63 while the digital code is usedto control the adjusting of the digitally controlled oscillator 64. Bythe use of the aforesaid direct converter, the error rate can be reducedto below 1% by just one adjusting of oscillation frequency with respectto one analysis of SYNC signal. However, the circuit of that shown inFIG. 7 is comparatively harder to design sine it will require muchprecise matching between functional blocks thereof.

Please refer to FIG. 7B, which is a schematic diagram illustrating thefunctional blocks of an auto-adjusting high accuracy oscillatoraccording to a sixth embodiment of the present invention. Theauto-adjusting high accuracy oscillator of FIG. 7B comprises a pulsedetector 71, a charge pump 72, a one-bit analog/digital converter 73, asuccessive-approximation circuit 74 and a digitally controlledoscillator 75. The difference between those shown in FIG. 7A and FIG. 7Bis that the successive-approximation circuit 74 is added in the circuitso that the function of the multi-bits analog/digital converter 63 ofFIG. 7A can be replace by the cooperation of the one-bit analog/digitalconverter 73 and the successive-approximation circuit 74. Although theadjusting efficiency of the oscillator of FIG. 7B is slower than thatshown in FIG. 7A, the circuit design of the oscillator of FIG. 7 iscomparably easier to be achieved.

Please refer to FIG. 7C, which is a schematic diagram illustrating thefunctional blocks of an auto-adjusting high accuracy oscillatoraccording to a seventh embodiment of the present invention. Theauto-adjusting high accuracy oscillator of FIG. 7C comprises a pulsedetector 81, a time-to-digital converter 82, a successive-approximationcircuit 83, and a digital controlled oscillator 84. The differencebetween those shown in FIG. 7B and FIG. 7C is that the function providedby the cooperation of the charge pump 72 and the one-bit analog/digitalconverter 73 is completely replaced by the time-to-digital converter 82.

From the above description, the present can provide an auto-adjustinghigh accuracy oscillator for an universal-serial-bus (USB) interfacethat is capable of matching an internal clock to a data stream inputtedfrom the USB interface by approaching the difference between two to bewithin 1% error rate, whereas the auto-adjusting oscillator is aninternal non-crystal oscillator so that it is a compact and cost-savingdevice with auto-adjusting mechanism capable of being adapted for anyspecifications of USB protocol, such as USB 1.1 and USB 2.0, etc. Inaddition, the present can provide also provide an auto-adjusting highaccuracy oscillator with internal feedback circuit for detecting andcalibrating oscillating frequency, in which a detection circuit is usedfor automatically detecting the frequency difference between an USBsignal and an oscillating frequency generated from an oscillator whilecalibrating and approaching the oscillating frequency to be within 1%error rate of the USB signal by a means of successive-approximation.

While the preferred embodiment of the invention has been set forth forthe purpose of disclosure, modifications of the disclosed embodiment ofthe invention as well as other embodiments thereof may occur to thoseskilled in the art. Accordingly, the appended claims are intended tocover all embodiments which do not depart from the spirit and scope ofthe invention.

1. An auto-adjusting high accuracy oscillator, comprising: a frequencycomparator, for comparing a synchronization signal obtained from a USBhost with an oscillation signal obtain from a device so as to obtain afrequency difference between the two; a control tuning circuit, furthercomprising a counter and an adder/sub circuit, for receiving thefrequency difference received form the frequency comparator and usingthe same as an adjusting reference; and an oscillating element; wherein,a variation is obtained by the counting of the counter whiletransmitting the variation and the adjusting reference to the adder/subcircuit to be encoded thereby into a digital code so as to enable theoscillating element to perform a frequency up/down operation accordingto the digital code, and thus enable the frequency of the oscillationsignal to approach that of the synchronization signal successively. 2.The oscillator of claim 1, wherein the frequency comparator furthercomprises a pulse detector.
 3. The oscillator of claim 1, wherein theoscillating element is a digitally controlled oscillator.
 4. Theoscillator of claim 1, wherein the interactive operations of thefrequency comparator and the control tuning circuit are controlled by acontrol unit for controlling the adjustment of pulses of the controltuning circuit, the timing of capturing electric signals, the timing toactivate an auto-adjusting operation, the frequency dividing operationof a divider, the charging/discharging of a charge pump, and therecovery time so as to ensure data to be transmitted accurately.